How far ahead of the camera, along the way it looks, the floor place (x, y) is, in picture pixels. Negative behind the camera.
Game Boy: not available
Game Boy Color: not available
Sega Genesis: not built yet - The Sega Genesis will draw the road its own way.
On other consoles this differs: see Side by side and How the consoles differ.
perspective_floor_ahead(x, y) -> real| Name | Type |
|---|---|
x | real |
y | real |
real
How far ahead of the camera, along the way it looks, the floor place (x, y) is, in picture pixels. Negative when the place is behind the camera.
This is the floor distance helper: a place's depth in front of the camera, for a driver that brakes for what is ahead, or to sort things. For the distance between two places on the floor, use dist_to: floor places are plain picture pixels, so it needs no help.
// Step event of a pickup: it is hidden once the camera has gone past it.
if (perspective_floor_ahead(x, y) < 0) { visible = false; }A pickup the camera has passed stops being shown.
The floor distance helper: a place’s depth in front of the camera, for a driver that brakes for what is ahead or for sorting. For the distance between two floor places use dist_to: floor places are plain picture pixels.